usedVariableNameAnalyzer = $usedVariableNameAnalyzer; $this->compactFuncCallAnalyzer = $compactFuncCallAnalyzer; } public function isUsed(Node $node, Variable $variable) : bool { if ($node instanceof Include_) { return \true; } // variable as variable variable need mark as used if ($node instanceof Variable && $node->name instanceof Expr) { return \true; } if ($node instanceof FuncCall) { return $this->compactFuncCallAnalyzer->isInCompact($node, $variable); } return $this->usedVariableNameAnalyzer->isVariableNamed($node, $variable); } }